package com.example.quartzdemo.memory;

/**
 * @author yeyangtao
 * @since 2022/6/20 09:54
 */
public class CacheFactory {

    public static LocalCache getLocalCache(LocalCacheTypeEnum type) {
        LocalCache localCache = null;
        switch (type) {
            case MAP:
                localCache = LocalCacheMap.localCache;
            case LIST:
                localCache = LocalCacheList.localCache;
        }
        if (null == localCache) {
            return null;
        }
        localCache.observer();
        return localCache;
    }
}
